<extend name="Index/index" />

<block name="nav1">
    <ul class="breadcrumb">
        <li>
            <i class="icon-home home-icon"></i>
            <a href="#">Admin</a>
        </li>
        <li class="active">修改商品</li>
    </ul><!-- .breadcrumb -->
</block>

<block name="nav2">
    <div class="page-content">
<div class="page-header">
    <h1>
        商品
        <small>
            <i class="icon-double-angle-right"></i>
            修改商品
        </small>
    </h1>
</div><!-- /.page-header -->

<div class="row">
    <div class="col-xs-12">
        <!-- PAGE CONTENT BEGINS -->

        <form class="form-horizontal" role="form" action="<{:U('update')}>" method="post">
        <input type="hidden" name="id" value="<{$data.id}>">
            <div class="form-group">
                <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 商品分类 </label>

                <div class="col-sm-9">
                
                    <select name="cid" >
                        <foreach name="list1" item="v">
                        <!-- <option ><{$v['level']+1}>级分类</option> -->
                        <option value="<{$v.id}>"><{$v.html}><{$v.name}></option>
                        </foreach> 
                    </select> 
                
                </div>
            </div>

            <div class="space-4"></div>

            <div class="form-group">
                <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 商品名 </label>

                <div class="col-sm-9">
                    <input type="text" id="form-field-1" class="col-xs-10 col-sm-5" name="gname" value="<{$data.gname}>" />
                </div>
            </div>

            <div class="space-4"></div>

            <div class="form-group">
                <label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 价格 </label>

                <div class="col-sm-9">
                    <input type="text" id="form-field-2" class="col-xs-10 col-sm-5" name="price" value="<{$data.price}>" />
                    <!-- <span class="help-inline col-xs-12 col-sm-7">
                        <span class="middle">Inline help text</span>
                    </span> -->
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label no-padding-right" for="form-field-4">库存</label>

                <div class="col-sm-9">
                    <input class="col-xs-10 col-sm-5" type="text" id="form-field-4" name="stock" value="<{$data.stock}>" />
                    <!-- <div class="space-2"></div>

                    <div class="help-block" id="input-size-slider"></div> -->
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label no-padding-right" for="form-field-5">点击量</label>

                <div class="col-sm-9">
                    <div class="clearfix">
                        <input class="col-xs-10 col-sm-5" type="text" id="form-field-5" name="cknum" value="<{$data.cknum}>" />
                    </div>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label no-padding-right" for="form-field-5">销量</label>

                <div class="col-sm-9">
                    <div class="clearfix">
                        <input class="col-xs-10 col-sm-5" type="text" id="form-field-5" name="sales" value="<{$data.sales}>" />
                    </div>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label no-padding-right">是否上架</label>

                <div class="col-sm-9">
                   
                        <input type="radio"  name="up" class="ace" value="1" <if condition="$data.up eq '1'">checked</if>/>
                        <span class="lbl">上架</span>
                    
                        <input type="radio"  name="up" class="ace" value="2" <if condition="$data.up eq '2'">checked</if>/>
                        <span class="lbl">下架</span>
                    
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label no-padding-right">是否热销</label>

                <div class="col-sm-9">
                   
                        <input type="radio"  name="hot" class="ace" value="1" <if condition="$data.hot eq '1'">checked</if>/>
                        <span class="lbl">热销</span>
                    
                        <input type="radio"  name="hot" class="ace" value="2" <if condition="$data.hot eq '2'">checked</if>/>
                        <span class="lbl">不热销</span>
                    
                </div>
            </div>

            <div class="space-4"></div>

            <div class="form-group">
                <label class="col-sm-3 control-label no-padding-right" for="form-field-6">描述</label>

                <div class="col-sm-9">
                   <textarea type="text" class="col-xs-10 col-sm-5" id="form-input-readonly"  name="des" value="editor.getContentTxt()"></textarea>
                </div>
            </div>

           
            <div class="clearfix form-actions">
                <div class="col-md-offset-3 col-md-9">
                    <button class="btn btn-info" type="submit">
                        <i class="icon-ok bigger-110"></i>
                        Submit
                    </button>
                </div>
            </div>
        </form>
    </div>   
</div>     
</block>
<block name="myjs">

</block>



